<div class="content-heading">Image Cropper</div>
<div class="image-cropper-container">
    <div class="row">
        <div class="col-md-4">
            <div class="panel">
                <div class="panel-heading">Select an image file</div>
                <div class="panel-body">
                    <label for="image-input" class="file-upload">
                        <button class="btn btn-default btn-block">Upload Image</button>
                        <input id="image-input" type="file" (change)="fileChangeListener($event)">
                    </label>
                    <p class="pv">Crop type:</p>
                    <div class="btn-group btn-group-justified mb">
                        <label class="btn btn-default" (click)="setRoundedMethod(false)" [class.active]="!cropperSettings.rounded">Square</label>
                        <label class="btn btn-default" (click)="setRoundedMethod(true)" [class.active]="cropperSettings.rounded">Circle</label>
                    </div>
                    <div class="result" *ngIf="data1.image">
                        <p class="pv">Cropped image</p>
                        <img class="center-block img-responsive" [class.img-circle]="cropperSettings.rounded"  [src]="data1.image" [width]="cropperSettings.croppedWidth" [height]="cropperSettings.croppedHeight">
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-8">
            <div class="panel">
                <div class="panel-body">
                    <img-cropper #cropper [image]="data1" [settings]="cropperSettings" (onCrop)="cropped($event)"></img-cropper>
                </div>
            </div>
        </div>
    </div>
</div>
